from flask_restful import Resource
from flask import current_app, jsonify
from yaml import load, Loader


class TagService(Resource):
    def get(self):
        tags = load(open('tags.yml', 'r'), Loader=Loader)
        current_app.logger.info("tags: {}".format(tags))
        return jsonify(tags=tags)
